trick to find group and period of an element